import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

//用户信息
import user from './modules/user.js'
//用户购物车
import cart from './modules/cart.js'
//用户地址
import path from './modules/path.js'
//导入永久保存vuex的包
import createPersistedState from "vuex-persistedstate"
//用户订单
import order from './modules/order.js'
export default new Vuex.Store({
    state: {},
    getters: {},
    mutations: {},
    actions: {},
    modules: {
        user,
        cart,
        path,
        order
    },
    plugins: [createPersistedState({
        storage: window.sessionStorage
    })]

});